{{template "admin/public/head.html" .}}
<section>
	<aside>
		{{template "admin/public/nav.html" .}}
	</aside>
	<article>
		<div class="top-title">
			<dl>
				<dt><h1>{{.title}}</h1></dt>
				<dd><form method="get"><input type="text" class="input" placeholder="请输入您需要搜索的会员名字！" name="search"><input type="submit" value="搜索" class="button" /></form></dd>
				<dd><a href="wood_help.html"><i class="iconfont">&#xe649;</i>帮助文档</a></dd>
			</dl>
		</div>
		<div class="content">
			<div class="release">
				<dl>
					<dt><i class="iconfont">&#xe649;</i> <b>{{.title}}说明</b><br>
						<p>会员都是通过微信登录获取到的信息<br>尽量不要<mark>编辑会员</mark>或者<mark>删除会员</mark></p>
					</dt>
					<dd><a href="/admin/systems/driver_add"><button type="button" class="button">添加司机</button></a></dd>
				</dl>
			</div>
			<!-- 会员列表 -->
			<table class="table">
				<thead><th width="25%">头像</th><th width="25%">司机信息</th><th width="25%">登入信息</th><th width="25%">操作</th></thead>
				{{range .info}}
				<tr id="{{.id}}">
					<td class="center"><a href="/admin/member/content?id={{.id}}"><img src="{{.pathname}}" class="img-1" onerror="javascript:this.src='/static/img/admin/avatar.jpg'"></a></td>
					<td>
						<a href="/admin/member/content?id={{.id}}">{{.monicker}}</a> （ ID：{{.id}} ）<br>
						手机：{{.mobile}}<br>
						地址：{{.dq}}
					</td>
					<td>
						注册时间：{{.addtime}}<br>
						注册 I P ：{{.addip}}<br>
						登入次数：{{.loginnumber}} 次<br>
						最近登入：{{.logintime}}<br>
						登入 I P ：{{.loginip}}
					</td>
					<td class="operation">
						<a href="/admin/systems/driver_edit?id={{.id}}">编辑</a><br>
						<a href="/admin/member/content?id={{.id}}">详情</a><br>
						<a class="del" data-id="{{.id}}">删除</a>
					</td>
				</tr>
				{{end}}
			</table>
		</div>
	</article>
</section>

<footer><!-- 系统监控内容 --></footer>
<script src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/admin/js/jquery.jedate.min.js"></script>
<script src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/admin/js/toast.js"></script>
<script src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/admin/js/uppic.js"></script>
<script src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/admin/js/xcConfirm.js"></script>
<script src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/admin/js/app.js"></script>
<script>
	$('.del').click(function(){
		var id=$(this).attr('data-id');
		wxc.xcConfirm("您确定要删除这个司机吗?","confirm",{onOk:function(){
			$.ajax({
				url:'/admin/systems/driver_del',
				data:{table:'mt_member',id:id},
				type:'get',
				success:function(res) {
					if(res==1){
						showMessage('删除成功');
						$('#'+id).css('display','none');
					}else{
						wxc.xcConfirm("操作失败,请重试","error");
					}
				}
			})	
		}});
	})
</script>
</body>
</html>
